'use strict';
/*
 *@description: 教材目录树对象
 *@author: wudandan
 *@date: 2020-09-09 16:47:22
*/
import YJTObject from 'yj-object';
class ItemDtoData extends YJTObject {
  constructor () {
    const Fields = {
      // 标签id
      tagId: '',
      // 标签值编码
      enumCode: '',
      // 标签值名称
      enumName: '',
      // 课时编码
      itemCode: '',
      // 标签名称
      tagName: ''
    };
    super(Fields);
  }

  get tagId () {
    return this._tagId;
  }

  set tagId (val) {
    this._tagId = val;
  }

  get enumCode () {
    return this._enumCode;
  }

  set enumCode (val) {
    this._enumCode = val;
  }

  get enumName () {
    return this._enumName;
  }

  set enumName (val) {
    this._enumName = val;
  }

  get itemCode () {
    return this._itemCode;
  }

  set itemCode (val) {
    this._itemCode = val;
  }

  get tagName () {
    return this._tagName;
  }

  set tagName (val) {
    this._tagName = val;
  }
}
class CatalogTreeData extends YJTObject {
  constructor () {
    const Fields = {
      // id
      id: '',
      // 目录名称
      name: '',
      // 目录类型 1教材目录，2专题目录
      type: {
        type: Number,
        default: 0
      },
      // 目录子类型 -1, 未知类型,0, 普通课程,11 书,1 单元,2期中,3期末,4课时
      subType: {
        type: Number,
        default: 0
      },
      // 顺序号
      itemOrder: {
        type: Number,
        default: 0
      },
      // 使用状态
      status: {
        type: Number,
        default: 0
      },
      // 层级
      level: {
        type: Number,
        default: 0
      },
      // 父id
      parentId: '',
      // 标签
      itemDTOList: {
        type: Array,
        generics: ItemDtoData
      },
      // 子节点
      childList: {
        type: Array,
        generics: CatalogTreeData
      }
    };
    super(Fields);
  }

  get id () {
    return this._id;
  }

  set id (val) {
    this._id = val;
  }

  get name () {
    return this._name;
  }

  set name (val) {
    this._name = val;
  }

  get type () {
    return this._type;
  }

  set type (val) {
    this._type = val;
  }

  get subType () {
    return this._subType;
  }

  set subType (val) {
    this._subType = val;
  }

  get itemOrder () {
    return this._itemOrder;
  }

  set itemOrder (val) {
    this._itemOrder = val;
  }

  get status () {
    return this._status;
  }

  set status (val) {
    this._status = val;
  }

  get level () {
    return this._level;
  }

  set level (val) {
    this._level = val;
  }

  get parentId () {
    return this._parentId;
  }

  set parentId (val) {
    this._parentId = val;
  }

  get childList () {
    return this._childList;
  }

  set childList (val) {
    this._childList = val;
  }
}
export default class CatalogTreeInfo extends YJTObject {
  constructor () {
    const Fields = {
      data: {
        type: Array,
        generics: CatalogTreeData
      }
    };
    super(Fields);
  }

  get data () {
    return this._data;
  }

  set data (val) {
    this._data = val;
  }
}
